<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">

	<ul class="nav nav-tabs">
		<li><a class="nav-link" href="{:url('company/add')}">新建客户公司</a></li>
        <li class="active"><a class="nav-link active" href="{:url('company/index')}">客户公司列表</a></li>
        
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('company/index')}">
        公司名称:
        <input type="text" class="form-control" name="company_name" value="{$company_name}" style="width: 188px;" placeholder="请输入公司名称"> &nbsp;&nbsp;
  
       
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('company/index')}">清空</a>
    </form>
	
	<div class="row">
		<div class="col-md-12">
			<div class="card-body">
				<div class="table-actions">
		           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label>总计<span style="font-size: 24px;">{$sum_result_count}</span>条数据</label>
		        </div>
			    <form method="post" class="js-ajax-form margin-top-20" action="{:url('case/listOrder')}">
			        
			        
			        <table class="table table-hover table-bordered">
			            <thead>
			            <tr>
			                <th width="50">ID</th>
			                <th>公司名称</th>
			                <th>添加时间</th>
			                <th>修改时间</th>
			                <th width="160">{:lang('ACTIONS')}</th>
			            </tr>
			            </thead>
			            <tbody>
			            <foreach name="result" item="vo" key='k'>
			                <tr>			 
			                	<td><?php echo ($now_page-1)*10+$k+1;?></td>    
			                    <td><a href="javascript:;" onclick="company({$vo.id});">{$vo.company_name}</a></td>			                
			                    <td>{:date('Y-m-d H:i:s',$vo['add_time'])}</td>
			                    <td>{:date('Y-m-d H:i:s',$vo['update_time'])}</td>		     		               
			                    <td>
			                        <a href="{:url('company/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
			                        <!-- <a href="{:url('case/delete',array('id'=>$vo['id']))}"
			                           class="js-ajax-delete">{:lang('DELETE')}</a> -->
			                        
			                    </td>
			                </tr>
			            </foreach>
			            </tbody>
			        </table>
			        <ul class="pagination">{$page|default=''}</ul>
			    </form>
			

			</div>
		</div>
	</div>
</div>
</body>
<block name="script">

<script src="__STATIC__/js/admin.js"></script>
<script>
	 function company(id) {
        openIframeLayer("{:url('company/detail')}?id="+id+"&status=2", '公司详情', {
            area: ['80%;', '80%;'],
            btn: ['确定'],
            yes: function (index, layero) {            
                layer.close(index); //如果设定了yes回调，需进行手工关闭
            }
        });
    }
</script>
</block>